<?php

class LoXien4x90 extends BaseLoDe
{
    function __construct()
    {
        $this->MAX_CHOICE = 4;
        
        $this->typeGame = Constant::GAME_LOXIEN4x90_TYPE;
        $this->gameName = 'Lô xiên 4 X90';
        $this->rationMoney = 90;
    }
    
    public function calculateRequiredAmount()
    {
        return $this->bet;
    }
    
    public function calculateWinMoney($ketquaXoSo)
    {
        //parent::calculateWinMoney($lode);
        // Máº£ng cÃ¡c con lÃ´
        $arrX3dot5 = json_decode($ketquaXoSo->x3dot5);
        
        //  Náº¿u 1 trong cÃ¡c sá»‘ chá»�n khÃ´ng Ä‘Ãºng thÃ¬ thua, tiá»�n tháº¯ng = 0;
        foreach ($this->arrChoices as $choice)
        {
            if(!in_array($choice, $arrX3dot5))
            {
                return 0;
            }
        }
        
        return $this->bet * $this->rationMoney;
    }
}

?>
